package cn.fenqing168.springcloud.feign;

import cn.fenqing168.springcloud.commons.BaseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * 账户服务feign接口
 * @author fenqing
 */
@FeignClient(value = "seata-account-service")
public interface FeignAccountService {

    /**
     * 减少账户的余额
     * @param userId
     * @param money
     * @return
     */
    @PutMapping("/account/decrease")
    BaseResult<?> decrease(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);

}
